<?php
return array(
	'attributeLabels' => array(
		'object_type' => '单据类型',
		'type' => '单据类型',
		'status' => '状态',
		'selectTime' => '创建时间',
		'sn' => '订单编号'
	),
	
	'relations' => array(
		'order' => array(ActiveRecord::BELONGS_TO, 'Order', 'relate_id'),
	),
	
	'rules' => array(
		array('type,sn','safe'),
	),
	
	'behaviors' => array(
		'autoTime' => array(
			'class' => 'lib.behaviors.auto.CCreateTime',
			'attribute' => 'create_time'
		),
		'search' => array(
			'class' => 'application.behaviors.SearchBehavior',
			'timeSearch' => 'create_time',
			'searchModel' => 'ReceivablesSearch'
		),
//		'stateHandle' => array(
//			'class' => 'ModelState',
//			'handleField' => 'status',
//			'configName' => 'status.receivables.audit',
//			'configReader' => Yii::app()->config,
//			'initState' => 'ST_NONE',
//		),
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'worker_id',
			),
//			'adminIgore' => false,
		),
	),
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);